package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.ArriveSchoolDto;
import xyz.zhouzhaodong.crm.service.IArriveSchoolService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 到校 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-19
 */
@RestController
@RequestMapping("/arrive-school")
public class ArriveSchoolController {

    @Resource
    IArriveSchoolService arriveSchoolService;

    /**
     * 新增到校信息
     * @param arriveSchoolDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addArriveSchool(ArriveSchoolDto arriveSchoolDto){
        return arriveSchoolService.addArriveSchool(arriveSchoolDto);
    }

    /**
     * 删除到校信息
     * @param arriveSchoolDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteArriveSchool(ArriveSchoolDto arriveSchoolDto){
        return arriveSchoolService.deleteArriveSchool(arriveSchoolDto);
    }

    /**
     * 修改到校信息
     * @param arriveSchoolDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateArriveSchool(ArriveSchoolDto arriveSchoolDto){
        return arriveSchoolService.updateArriveSchool(arriveSchoolDto);
    }

    /**
     * 查询到校信息
     * @param arriveSchoolDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectArriveSchool(ArriveSchoolDto arriveSchoolDto){
        return arriveSchoolService.selectArriveSchool(arriveSchoolDto);
    }

    /**
     * 查询到校信息列表
     * @param arriveSchoolDto
     * @return
     */
    @RequestMapping("/selectList")
    public RestMessage selectArriveSchoolList(ArriveSchoolDto arriveSchoolDto){
        return arriveSchoolService.selectArriveSchoolList(arriveSchoolDto);
    }

}
